package Chapter04.Homework;

import java.util.Scanner;

public class Test04 {
    public static void main(String[] args) {
        Scanner input=new Scanner(System.in);
            System.out.println("请输入三角形的高度：");
            int h=input.nextInt();
        for(int i=0;i<h;i++){
            for (int j=0;j<h-i-1;j++){
                System.out.print(" ");
            }
            for(int j=0;j<i;j++){
                System.out.print("*");
            }
            System.out.println();
        }
    }
}
